package com.liyghting.beans;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import com.liyghting.kafka.App;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LiYiGuang
 * @date 2018/12/29 14:57
 */
@RestController
@SpringBootApplication(scanBasePackages = "com.liyghting.beans")
@EnableAutoConfiguration(exclude = DataSourceAutoConfiguration.class)
public class TestBeanApp {

    @Autowired
    Test1Bean test1Bean;

    public static void main(String[] args) {
        SpringApplication.run(App.class, args);
    }
    @RequestMapping("/testBean")
    public ResponseEntity test() {
        test1Bean.test1();
        return ResponseEntity.ok(HttpStatus.OK);
    }
}
